# -*- conding:UTF-8 -*-

'''
@ Project: model
@ File: 2.py
@ Author: 韩成瑾
@ Date：2022/8/11 15:19

'''


data = {
    "2":"2",
    "3":"2",
    "4":"7",
    "5":"8",
    "6":"9",
}

dit = {}
for k,v in data.items():

    if dit.get(v):
        dit[v].append(k)
    else:
        dit[v] = [k]

print(dit)